' PicBasic program to blink an LED connected to GPIO.0 about once a second

' Define the ADC registers
Symbol	CMCON = $19
Symbol	ADRESH = $1E
Symbol	ADCON0 = $1F
Symbol	ANSEL = $9F

Symbol	LED = 0		' Alias LED to GPIO.0


	Poke CMCON, 7	' Analog comparators off
	Poke ANSEL, 0	' Set all digital


loop:	Low LED		' Turn on LED connected to GPIO.0
	Pause 500	' Delay for .5 seconds

	High LED	' Turn off LED connected to GPIO.0
	Pause 500	' Delay for .5 seconds

	Goto loop	' Go back to loop and blink LED forever

	End

